﻿
<%@ Page Language="C#"  MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"  CodeFile="PrescriptionVoid.aspx.cs" Inherits="Admin_PrescriptionVoid" Title="PrescriptionVoid List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		 <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" PageSize="5"
        DataKeyNames="PrescriptionID" DataSourceID="PrescriptionVoidDataSource" BorderColor="#CCCCCC"
        BorderStyle="None" BorderWidth="1px" onrowcommand="GridView1_RowCommand" >
		<Columns>
                <asp:HyperLinkField DataNavigateUrlFormatString="PrescriptionVoidEdit.aspx?PrescriptionID={0}"
                DataNavigateUrlFields="PrescriptionID" Text="Select" />				<data:HyperLinkField HeaderText="Prescription Id" DataNavigateUrlFormatString="PrescriptionEdit.aspx?PrescriptionId={0}" DataNavigateUrlFields="PrescriptionId" DataContainer="PrescriptionIdSource" DataTextField="PrescriptionID" />
				<asp:BoundField DataField="VoidReason" HeaderText="Void Reason" SortExpression="[VoidReason]"  />
				<asp:BoundField DataField="VoidPerson" HeaderText="Void Person" SortExpression="[VoidPerson]"  />
				<asp:BoundField DataField="VoidDate" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="False" HeaderText="Void Date" SortExpression="[VoidDate]"  />
				<asp:BoundField DataField="Remark" HeaderText="Remark" SortExpression="[Remark]"  />
				 <asp:TemplateField>
                    <ItemTemplate>
                        <asp:ImageButton ID="btn_Delete" runat="server" CommandName="CustomDelete" CommandArgument='<%#Eval("PrescriptionID") %>'
                            ImageUrl="~/Admin/resources/images/icons/cross_circle.png" OnClientClick="return confirm('Are you sure want to delete?');" />
                    </ItemTemplate>
            </asp:TemplateField>
			</Columns>
			<EmptyDataTemplate>
				<b>No PrescriptionVoid Found!</b>
			</EmptyDataTemplate>
		   <FooterStyle BackColor="White" ForeColor="#000066" />
        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
        <PagerSettings FirstPageText="« First" LastPageText="Last »" NextPageText="Next »"
            PreviousPageText="« Previous" Mode="NumericFirstLast" PageButtonCount="4"></PagerSettings>
        <PagerStyle CssClass="pagination" HorizontalAlign="Right" BackColor="White" ForeColor="#000066" />
        <RowStyle ForeColor="#000066" />
		</asp:GridView>
		<br />
		<asp:Button runat="server" ID="btnPrescriptionVoid" OnClientClick="javascript:location.href='PrescriptionVoidEdit.aspx'; return false;" Text="Add New"></asp:Button>
		<data:PrescriptionVoidDataSource ID="PrescriptionVoidDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:PrescriptionVoidProperty Name="Prescription"/> 
				</Types>
			</DeepLoadProperties>
			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:PrescriptionVoidDataSource>
	    		
</asp:Content>



